package com.zcp.service;

import com.zcp.dao.Class_ComDAO;
import com.zcp.entity.Class_Com;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional

public class Class_ComServiceImpl implements Class_ComService{

    @Autowired
    private Class_ComDAO class_comDAO;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Class_Com> finaAll() {
        return class_comDAO.findAll();
    }

    @Override
    public void save(Class_Com Class_Com) {
        class_comDAO.save(Class_Com);
    }

    @Override
    public Class_Com change(Integer id) {
        return class_comDAO.change(id);
    }

    @Override
    public void changed(Class_Com class_Com) {
        class_comDAO.changed(class_Com);
    }

    @Override
    public void delete(Integer id) {
        class_comDAO.delete(id);
    }
}
